package com.atguigu.ssyx.client.user;

import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * feign远程调用，用于用户模块远程调用
 */
@Api(tags = "用户远程调用服务接口")
@FeignClient("service-user")
@RequestMapping("/api/user/leader")
public interface UserFeignClient {

    // 根据用户Id获取团长信息和提货地址
    @ApiOperation("获取团长信息和提货地址")
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId);

}
